package com.xuecheng.content.controller;

import com.xuecheng.api.content.CourseAuditApi;
import com.xuecheng.api.content.model.qo.QueryCourseModel;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import com.xuecheng.content.service.CourseBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created on 2021/04/02/21:16 周五
 *
 * @author Lantin
 */
@RestController
public class CourseAuditController implements CourseAuditApi {

    @Autowired
    private CourseBaseService courseBaseService;


    @PostMapping("/m/course/list")
    public PageVO queryCourseList(PageRequestParams pageRequestParams,
                                  @RequestBody QueryCourseModel model) {


        return courseBaseService.queryCourseList(pageRequestParams, model, null);
    }


    @PostMapping("m/courseReview/approve")
    public void approveCourseBase(@RequestBody Map<String, Object> params) {


        courseBaseService.approveCourseBase(params);

    }
}
